<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/12/17
 * Time: 15:02
 */

namespace app\index\model;


use think\Model;

class Order extends Model
{

    protected $table = "duck_shop_order";

    public function getPayTimeAttr($value){
        return date("Y-m-d H:i:s",$value);
    }
    public function getOrderTimeAttr($value){
        return date("Y-m-d H:i:s",$value);
    }
    public function orderFoods(){
        return $this->hasMany('orderFoods','order_no','order_no');
    }
    public function orderShop(){
        return $this->hasOne('ShopList','id','shop_id');
    }

    public function fatherFoods(){
        return $this->hasMany('orderFoods','father_no','order_no');
    }


}